package com.fanketly.funacg2.ui.components

import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.size
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.ArrowRight
import androidx.compose.material3.ElevatedCard
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.Icon
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.unit.dp

@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun ActionRowCard(
    modifier: Modifier = Modifier,
    rowModifier: Modifier = Modifier,
    imageVector: ImageVector,
    text: String,
    onClick: () -> Unit,
) {
    ElevatedCard(modifier = modifier, onClick = onClick) {
        Row(modifier = rowModifier.fillMaxWidth(), verticalAlignment = Alignment.CenterVertically) {
            Icon(imageVector, contentDescription = null, modifier = Modifier.size(30.dp))
            Text(text = text, modifier = Modifier.weight(1f))
            Icon(
                Icons.Filled.ArrowRight,
                contentDescription = null,
                modifier = Modifier.size(24.dp)
            )
        }
    }
}